package s2.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

import java.io.Serializable;

/**
 * Created by IFT8
 * on 2015/7/18.
 */
public class ActionTest extends ActionSupport implements Serializable {
    @Override
    public String execute() throws Exception {
        ActionContext actionContext = ActionContext.getContext();
        actionContext.put("request", "request_info");//相当于request.setAttribute
        actionContext.getApplication().put("application", "application_info");//相当于getServletContext().setAttribute
        actionContext.getSession().put("session", "session_info");//相当于request.getSession().setAttribute
        return super.execute();
    }
}
